package com.lian.hope.service;

import com.lian.hope.model.dto.ProjectsDTO;
import com.lian.hope.model.dto.ProjectsDonationsDTO;
import com.lian.hope.model.vo.PageBean;
import com.lian.hope.model.vo.ProjectsVO;

public interface ProjectsService {
    /**
     * 分页获取项目列表
     *
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageBean<ProjectsVO> listProjects(Integer pageNum, Integer pageSize);

    /**
     * 新增项目
     *
     * @param projects
     * @param userId
     */
    void insertProjects(ProjectsDTO projects, Long userId);

    /**
     * 随机获取一个项目
     *
     * @return
     */
    ProjectsVO getRandomProjects();

    void insertDonations(Long projectId, ProjectsDonationsDTO projectsDonationsDTO, Long userId);

    ProjectsVO getProjectById(Long id);
}
